package cn.tedu.csmall.pojo.dto;


import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.*;
import java.io.Serializable;

@Data
@Accessors(chain = true)
public class CategoryAddNewDTO implements Serializable {

    @ApiModelProperty(value = "类别名称", example = "家电", required = true)
    @NotNull(message = "增加类别失败,必须提交类别名称!")
    @NotEmpty
    @NotBlank
    private String name;

    @ApiModelProperty(value = "父类类别id,如果是一级分类则为0", example = "10", required = true)
    @NotNull(message = "增加类别失败,必须提交父级类别id!")
    private Long parentId;

    @ApiModelProperty(value = "类别关键词", example = "家电,家用电器", required = true)
    @NotNull(message = "增加类别失败,必须提交类别关键词!")
    private String keywords;

    @ApiModelProperty(value = "自定义排序序号",example = "45", required = true)
    @NotNull(message = "增加类别失败,必须提交自定义排序序号!")
    @Max(99)
    @Min(1)
    private Integer sort;

    @ApiModelProperty(value = "图标图片的URL", example = "http://www.tedu.cn/log.png", required = true)
    @NotNull(message = "增加类别失败,必须提交图标图片的URL!")
    private String icon;

    @ApiModelProperty(value = "是否启用，1=启用，0=未启用", example = "1", required = true)
    @NotNull(message = "增加类别失败,必须选择是否启用!")
    private Integer enable;

    @ApiModelProperty(value = "是否显示在导航栏中，1=是，0=否", example = "1", required = true)
    @NotNull(message = "增加类别失败,必须选择是否显示在导航栏中!")
    private Integer display;


}
